﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DomainDriver.DomainModeling.Repositories
{
    public partial class Repository<KEY, KEYED_DOMAIN_OBJECT> : IRepositoryInfoProvider
    {
        #region IRepositoryInfoProvider Implementation

        Type IRepositoryInfoProvider.DomainObjectType
        {
            get
            {
                Type domainObjectType = typeof(KEYED_DOMAIN_OBJECT);
                return domainObjectType;
            }
        }

        Type IRepositoryInfoProvider.RepositoryType
        {
            get
            {
                Type repositoryType = this.GetType();
                return repositoryType;
            }
        }

        string IRepositoryInfoProvider.DomainObjectClassName
        {
            get
            {
                string domainObjectName = InfoProvider.DomainObjectType.FullName;
                return domainObjectName;
            }
        }

        string IRepositoryInfoProvider.RepositoryClassName
        {
            get
            {
                string repositoryName = InfoProvider.RepositoryType.FullName;
                return repositoryName;
            }
        }

        string IRepositoryInfoProvider.DomainObjectClassShortName
        {
            get
            {
                string domainObjectName = InfoProvider.DomainObjectType.Name;
                return domainObjectName;
            }
        }

        string IRepositoryInfoProvider.RepositoryClassShortName
        {
            get
            {
                string repositoryName = InfoProvider.RepositoryType.Name;
                return repositoryName;
            }
        }

        #endregion
    }
}